package com.vcredit.creditcat.enumtype;

public enum SmsDescEnum {
	oldVersionAppDesc(1,"oldVersionAppDesc","信用猫")
	,creditcat(2, "creditcat","信用猫")
	,fastloan(3, "fastloan","缺钱花")
	,yaodaikuan(4, "yaodaikuan","要贷款")
	;

	private Integer code;
	private String appDesc;
	private String name;

	private SmsDescEnum(Integer code, String appDesc, String name) {
		this.code = code;
		this.appDesc = appDesc;
		this.name = name;
	}
	
	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getAppDesc() {
		return appDesc;
	}

	public void setAppDesc(String appDesc) {
		this.appDesc = appDesc;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public  static String getNameByAppDesc(String appDesc) {
			for (SmsDescEnum c : SmsDescEnum.values()) {
				if (c.getAppDesc().equals(appDesc)) {
					return c.getName();
				}
			}
			return null;
	}
}
